{extend name="Public:base"/}

{block name="main"}
<div class="box-info">
    <div class="table-toolbar">
        <div class="row">
            <div class="col-md-12">
                <a class="btn btn-primary" href="{:U('Admin/add')}"> 新增</a>
            </div>
        </div>
    </div>

    <div class="row table-container">
        <div class="col-md-12">
            <form name="myform" action="{:U('Admin/deleteall')}" method="post">
                <table class="table table-hover table-bordered">
                    <thead>
                    <tr>
                        <th style="width:20px;"><input type="checkbox" id="check_box" onclick="selectall('ids[]');"/></th>
                        <th>用户名</th>
                        <th>邮箱</th>
                        <th>最后登录时间</th>
                        <th>状态</th>
                        <th>操作管理</th>
                    </tr>
                    </thead>

                    <tbody>
                    {empty name="list"}
                    <tr class="table-data-empty">
                        <td class="text-center empty-info" colspan="6">
                            <i class="fa fa-database"></i> 暂时没有数据<br>
                            <span class="small">本系统由{$Think.config.CMS_APPNAME} v1 强力驱动</span>
                        </td>
                    </tr>
                    {else/}
                    {volist name="list" id="vo" key="k"}
                    <tr>
                        <td><input class="inputcheckbox " name="ids[]" value="{$vo['id']}" type="checkbox"></td>
                        <td>{$vo.username}</td>
                        <td>{$vo.email}</td>
                        <td>
                            {empty name="vo['last_login_time']"}
                            ^没有登录过^
                            {else/}
                            {$vo['last_login_time']|date="Y-m-d H:m:s",###}
                            {/empty}
                        </td>
                        <td>
                            {eq name="vo.status" value="1"}
                            <a href=""><i class="fa fa-check text-success"></i></a>
                            {else/}
                            <a href="javascript:;"><i class="fa fa-ban text-danger"></i></a>
                            {/eq}
                        </td>
                        <td>
                            {neq name="vo.id" value="1"}
                            <a class="btn btn-sm btn-primary" href="{:U('Admin/edit','id='.$vo['id'])}">编辑</a>
                            <a class="btn btn-sm btn-danger" href="javascript:confirm_delete('{:U('Admin/delete',array('id'=>$vo['id']))}')">删除</a>
                            {/neq}
                        </td>
                    </tr>
                    {/volist}
                    {/empty}
                    </tbody>
                </table>
            </form>

            <div class="pagination">{$page}</div>
        </div>

    </div>
</div>
{/block}